package cz.zcu.fav.ratdroid.bean;

import java.io.Serializable;
import java.util.List;

import org.simpleframework.xml.Element;
import org.simpleframework.xml.ElementList;
import org.simpleframework.xml.Root;

@Root(name = "reservation")
public class Reservation implements Serializable
{

	public static String SINGLE_RESERVATION_IDENTIFIER = "reservation.identifier";

	private static final long serialVersionUID = -6383623210430182201L;
	@Element(name = "id", required = false)
	private Integer id;
	@Element(name = "objectId")
	private Integer objectId;
	@Element(name = "objectName")
	private String objectName;
	@Element(name = "userId")
	private Integer userId;
	@Element(name = "userName", required = false)
	private String userName;
	@Element(name = "periodical")
	private boolean periodical;
	@Element(name = "periodCount")
	private int periodCount;

	@ElementList(name = "periods", inline = false, required = true)
	private List<Period> periods;

	public Integer getId()
	{
		return id;
	}

	public void setId(Integer id)
	{
		this.id = id;
	}

	public Integer getObjectId()
	{
		return objectId;
	}

	public void setObjectId(Integer objectId)
	{
		this.objectId = objectId;
	}

	public String getObjectName()
	{
		return objectName;
	}

	public void setObjectName(String objectName)
	{
		this.objectName = objectName;
	}

	public Integer getUserId()
	{
		return userId;
	}

	public void setUserId(Integer userId)
	{
		this.userId = userId;
	}

	public String getUserName()
	{
		return userName;
	}

	public void setUserName(String userName)
	{
		this.userName = userName;
	}

	public List<Period> getPeriods()
	{
		return periods;
	}

	public void setPeriods(List<Period> periods)
	{
		this.periods = periods;
	}

	public boolean isPeriodical()
	{
		return periodical;
	}

	public void setPeriodical(boolean periodical)
	{
		this.periodical = periodical;
	}

	public int getPeriodCount()
	{
		return periodCount;
	}

	public void setPeriodCount(int periodCount)
	{
		this.periodCount = periodCount;
	}
}
